<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>SJ 01</title>
    <style type="text/css" media="screen">
        * {
            border: 0;
            padding: 0;
            margin: 0;
        }
        
        #vform label {
            margin-right: 1em;
            width: 10em;
            border: dotted 1px #2f2;
        }
        
        #vform input {
            width: 12em;
            border: dotted 1px #2f2;
            margin-right: 24px;
        }
    </style>
</head>
<body>
    <form id="vform" action="" method="post">
        <label for="name">Name</label><input type="text" name="name" id="name" /><br />
        <label for="email">Email</label><input type="text" name="email" id="email" /><br />
        <label for="phone">Phone</label><input type="text" name="phone" id="phone" maxlength="8" /><br />
        <label for="site">Site/blog</label><input type="text" name="site" id="site" /><br />
    </form>
    <script type="text/javascript" src="sj.js"></script>
    <script type="text/javascript">
        SJ.addEvent(window, 'load', validate_init);

        function validate_init()
        {
            SJ.init();
            SJ.add('name', 'notnull');
            SJ.add('email', 'email');
            SJ.add('phone', 'sing_mobile');
            SJ.add('site', 'url');
        }
    </script>
</body>
</html>
